/*
 * Copyright 2022 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1/write.proto

#include "google/firestore/v1/write.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fdocument_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fwrite_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2ffirestore_2fv1_2fcommon_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto;
namespace google {
namespace firestore {
namespace v1 {
class WriteDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Write> _instance;
  const ::google::firestore::v1::Document* update_;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr delete__;
  ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr verify_;
  const ::google::firestore::v1::DocumentTransform* transform_;
} _Write_default_instance_;
class DocumentTransform_FieldTransformDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DocumentTransform_FieldTransform> _instance;
  int set_to_server_value_;
  const ::google::firestore::v1::Value* increment_;
  const ::google::firestore::v1::Value* maximum_;
  const ::google::firestore::v1::Value* minimum_;
  const ::google::firestore::v1::ArrayValue* append_missing_elements_;
  const ::google::firestore::v1::ArrayValue* remove_all_from_array_;
} _DocumentTransform_FieldTransform_default_instance_;
class DocumentTransformDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DocumentTransform> _instance;
} _DocumentTransform_default_instance_;
class WriteResultDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<WriteResult> _instance;
} _WriteResult_default_instance_;
class DocumentChangeDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DocumentChange> _instance;
} _DocumentChange_default_instance_;
class DocumentDeleteDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DocumentDelete> _instance;
} _DocumentDelete_default_instance_;
class DocumentRemoveDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<DocumentRemove> _instance;
} _DocumentRemove_default_instance_;
class ExistenceFilterDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ExistenceFilter> _instance;
} _ExistenceFilter_default_instance_;
}  // namespace v1
}  // namespace firestore
}  // namespace google
static void InitDefaultsscc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_DocumentChange_default_instance_;
    new (ptr) ::google::firestore::v1::DocumentChange();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::DocumentChange::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};

static void InitDefaultsscc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_DocumentDelete_default_instance_;
    new (ptr) ::google::firestore::v1::DocumentDelete();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::DocumentDelete::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_DocumentRemove_default_instance_;
    new (ptr) ::google::firestore::v1::DocumentRemove();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::DocumentRemove::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}};

static void InitDefaultsscc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_DocumentTransform_default_instance_;
    new (ptr) ::google::firestore::v1::DocumentTransform();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::DocumentTransform::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base,}};

static void InitDefaultsscc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_;
    new (ptr) ::google::firestore::v1::DocumentTransform_FieldTransform();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::DocumentTransform_FieldTransform::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};

static void InitDefaultsscc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_ExistenceFilter_default_instance_;
    new (ptr) ::google::firestore::v1::ExistenceFilter();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::ExistenceFilter::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto}, {}};

static void InitDefaultsscc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_Write_default_instance_;
    new (ptr) ::google::firestore::v1::Write();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::Write::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<5> scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 5, 0, InitDefaultsscc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_Document_google_2ffirestore_2fv1_2fdocument_2eproto.base,
      &scc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_DocumentMask_google_2ffirestore_2fv1_2fcommon_2eproto.base,
      &scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base,
      &scc_info_Precondition_google_2ffirestore_2fv1_2fcommon_2eproto.base,}};

static void InitDefaultsscc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::google::firestore::v1::_WriteResult_default_instance_;
    new (ptr) ::google::firestore::v1::WriteResult();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::google::firestore::v1::WriteResult::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto}, {
      &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,
      &scc_info_ArrayValue_google_2ffirestore_2fv1_2fdocument_2eproto.base,}};

static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2ffirestore_2fv1_2fwrite_2eproto[8];
static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_google_2ffirestore_2fv1_2fwrite_2eproto[1];
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2ffirestore_2fv1_2fwrite_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2ffirestore_2fv1_2fwrite_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Write, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Write, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  offsetof(::google::firestore::v1::WriteDefaultTypeInternal, update_),
  offsetof(::google::firestore::v1::WriteDefaultTypeInternal, delete__),
  offsetof(::google::firestore::v1::WriteDefaultTypeInternal, verify_),
  offsetof(::google::firestore::v1::WriteDefaultTypeInternal, transform_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Write, update_mask_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Write, update_transforms_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Write, current_document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::Write, operation_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, _internal_metadata_),
  ~0u,  // no _extensions_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, _oneof_case_[0]),
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, field_path_),
  offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, set_to_server_value_),
  offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, increment_),
  offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, maximum_),
  offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, minimum_),
  offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, append_missing_elements_),
  offsetof(::google::firestore::v1::DocumentTransform_FieldTransformDefaultTypeInternal, remove_all_from_array_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform_FieldTransform, transform_type_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentTransform, field_transforms_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResult, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResult, update_time_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::WriteResult, transform_results_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentChange, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentChange, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentChange, target_ids_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentChange, removed_target_ids_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, removed_target_ids_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentDelete, read_time_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, document_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, removed_target_ids_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::DocumentRemove, read_time_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, target_id_),
  PROTOBUF_FIELD_OFFSET(::google::firestore::v1::ExistenceFilter, count_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::google::firestore::v1::Write)},
  { 13, -1, sizeof(::google::firestore::v1::DocumentTransform_FieldTransform)},
  { 26, -1, sizeof(::google::firestore::v1::DocumentTransform)},
  { 33, -1, sizeof(::google::firestore::v1::WriteResult)},
  { 40, -1, sizeof(::google::firestore::v1::DocumentChange)},
  { 48, -1, sizeof(::google::firestore::v1::DocumentDelete)},
  { 56, -1, sizeof(::google::firestore::v1::DocumentRemove)},
  { 64, -1, sizeof(::google::firestore::v1::ExistenceFilter)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_Write_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DocumentTransform_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_WriteResult_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DocumentChange_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DocumentDelete_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_DocumentRemove_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::firestore::v1::_ExistenceFilter_default_instance_),
};

const char descriptor_table_protodef_google_2ffirestore_2fv1_2fwrite_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\037google/firestore/v1/write.proto\022\023googl"
  "e.firestore.v1\032\034google/api/annotations.p"
  "roto\032 google/firestore/v1/common.proto\032\""
  "google/firestore/v1/document.proto\032\037goog"
  "le/protobuf/timestamp.proto\"\355\002\n\005Write\022/\n"
  "\006update\030\001 \001(\0132\035.google.firestore.v1.Docu"
  "mentH\000\022\020\n\006delete\030\002 \001(\tH\000\022\020\n\006verify\030\005 \001(\t"
  "H\000\022;\n\ttransform\030\006 \001(\0132&.google.firestore"
  ".v1.DocumentTransformH\000\0226\n\013update_mask\030\003"
  " \001(\0132!.google.firestore.v1.DocumentMask\022"
  "P\n\021update_transforms\030\007 \003(\01325.google.fire"
  "store.v1.DocumentTransform.FieldTransfor"
  "m\022;\n\020current_document\030\004 \001(\0132!.google.fir"
  "estore.v1.PreconditionB\013\n\toperation\"\345\004\n\021"
  "DocumentTransform\022\020\n\010document\030\001 \001(\t\022O\n\020f"
  "ield_transforms\030\002 \003(\01325.google.firestore"
  ".v1.DocumentTransform.FieldTransform\032\354\003\n"
  "\016FieldTransform\022\022\n\nfield_path\030\001 \001(\t\022`\n\023s"
  "et_to_server_value\030\002 \001(\0162A.google.firest"
  "ore.v1.DocumentTransform.FieldTransform."
  "ServerValueH\000\022/\n\tincrement\030\003 \001(\0132\032.googl"
  "e.firestore.v1.ValueH\000\022-\n\007maximum\030\004 \001(\0132"
  "\032.google.firestore.v1.ValueH\000\022-\n\007minimum"
  "\030\005 \001(\0132\032.google.firestore.v1.ValueH\000\022B\n\027"
  "append_missing_elements\030\006 \001(\0132\037.google.f"
  "irestore.v1.ArrayValueH\000\022@\n\025remove_all_f"
  "rom_array\030\007 \001(\0132\037.google.firestore.v1.Ar"
  "rayValueH\000\"=\n\013ServerValue\022\034\n\030SERVER_VALU"
  "E_UNSPECIFIED\020\000\022\020\n\014REQUEST_TIME\020\001B\020\n\016tra"
  "nsform_type\"u\n\013WriteResult\022/\n\013update_tim"
  "e\030\001 \001(\0132\032.google.protobuf.Timestamp\0225\n\021t"
  "ransform_results\030\002 \003(\0132\032.google.firestor"
  "e.v1.Value\"q\n\016DocumentChange\022/\n\010document"
  "\030\001 \001(\0132\035.google.firestore.v1.Document\022\022\n"
  "\ntarget_ids\030\005 \003(\005\022\032\n\022removed_target_ids\030"
  "\006 \003(\005\"m\n\016DocumentDelete\022\020\n\010document\030\001 \001("
  "\t\022\032\n\022removed_target_ids\030\006 \003(\005\022-\n\tread_ti"
  "me\030\004 \001(\0132\032.google.protobuf.Timestamp\"m\n\016"
  "DocumentRemove\022\020\n\010document\030\001 \001(\t\022\032\n\022remo"
  "ved_target_ids\030\002 \003(\005\022-\n\tread_time\030\004 \001(\0132"
  "\032.google.protobuf.Timestamp\"3\n\017Existence"
  "Filter\022\021\n\ttarget_id\030\001 \001(\005\022\r\n\005count\030\002 \001(\005"
  "B\256\001\n\027com.google.firestore.v1B\nWriteProto"
  "P\001Z<google.golang.org/genproto/googleapi"
  "s/firestore/v1;firestore\242\002\004GCFS\252\002\036Google"
  ".Cloud.Firestore.V1Beta1\312\002\036Google\\Cloud\\"
  "Firestore\\V1beta1b\006proto3"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_deps[4] = {
  &::descriptor_table_google_2fapi_2fannotations_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2fcommon_2eproto,
  &::descriptor_table_google_2ffirestore_2fv1_2fdocument_2eproto,
  &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_sccs[8] = {
  &scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base,
  &scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_once;
static bool descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto = {
  &descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_initialized, descriptor_table_protodef_google_2ffirestore_2fv1_2fwrite_2eproto, "google/firestore/v1/write.proto", 1865,
  &descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_once, descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_sccs, descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto_deps, 8, 4,
  schemas, file_default_instances, TableStruct_google_2ffirestore_2fv1_2fwrite_2eproto::offsets,
  file_level_metadata_google_2ffirestore_2fv1_2fwrite_2eproto, 8, file_level_enum_descriptors_google_2ffirestore_2fv1_2fwrite_2eproto, file_level_service_descriptors_google_2ffirestore_2fv1_2fwrite_2eproto,
};

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_google_2ffirestore_2fv1_2fwrite_2eproto = (  ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto), true);
namespace google {
namespace firestore {
namespace v1 {
const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* DocumentTransform_FieldTransform_ServerValue_descriptor() {
  ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_google_2ffirestore_2fv1_2fwrite_2eproto);
  return file_level_enum_descriptors_google_2ffirestore_2fv1_2fwrite_2eproto[0];
}
bool DocumentTransform_FieldTransform_ServerValue_IsValid(int value) {
  switch (value) {
    case 0:
    case 1:
      return true;
    default:
      return false;
  }
}

#if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
constexpr DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::SERVER_VALUE_UNSPECIFIED;
constexpr DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::REQUEST_TIME;
constexpr DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::ServerValue_MIN;
constexpr DocumentTransform_FieldTransform_ServerValue DocumentTransform_FieldTransform::ServerValue_MAX;
constexpr int DocumentTransform_FieldTransform::ServerValue_ARRAYSIZE;
#endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)

// ===================================================================

void Write::InitAsDefaultInstance() {
  ::google::firestore::v1::_Write_default_instance_.update_ = const_cast< ::google::firestore::v1::Document*>(
      ::google::firestore::v1::Document::internal_default_instance());
  ::google::firestore::v1::_Write_default_instance_.delete__.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_Write_default_instance_.verify_.UnsafeSetDefault(
      &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  ::google::firestore::v1::_Write_default_instance_.transform_ = const_cast< ::google::firestore::v1::DocumentTransform*>(
      ::google::firestore::v1::DocumentTransform::internal_default_instance());
  ::google::firestore::v1::_Write_default_instance_._instance.get_mutable()->update_mask_ = const_cast< ::google::firestore::v1::DocumentMask*>(
      ::google::firestore::v1::DocumentMask::internal_default_instance());
  ::google::firestore::v1::_Write_default_instance_._instance.get_mutable()->current_document_ = const_cast< ::google::firestore::v1::Precondition*>(
      ::google::firestore::v1::Precondition::internal_default_instance());
}
class Write::_Internal {
 public:
  static const ::google::firestore::v1::Document& update(const Write* msg);
  static const ::google::firestore::v1::DocumentTransform& transform(const Write* msg);
  static const ::google::firestore::v1::DocumentMask& update_mask(const Write* msg);
  static const ::google::firestore::v1::Precondition& current_document(const Write* msg);
};

const ::google::firestore::v1::Document&
Write::_Internal::update(const Write* msg) {
  return *msg->operation_.update_;
}
const ::google::firestore::v1::DocumentTransform&
Write::_Internal::transform(const Write* msg) {
  return *msg->operation_.transform_;
}
const ::google::firestore::v1::DocumentMask&
Write::_Internal::update_mask(const Write* msg) {
  return *msg->update_mask_;
}
const ::google::firestore::v1::Precondition&
Write::_Internal::current_document(const Write* msg) {
  return *msg->current_document_;
}
void Write::set_allocated_update(::google::firestore::v1::Document* update) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_operation();
  if (update) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      update = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, update, submessage_arena);
    }
    set_has_update();
    operation_.update_ = update;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.update)
}
void Write::clear_update() {
  if (_internal_has_update()) {
    delete operation_.update_;
    clear_has_operation();
  }
}
void Write::set_allocated_transform(::google::firestore::v1::DocumentTransform* transform) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_operation();
  if (transform) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      transform = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, transform, submessage_arena);
    }
    set_has_transform();
    operation_.transform_ = transform;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.Write.transform)
}
void Write::clear_update_mask() {
  if (GetArenaNoVirtual() == nullptr && update_mask_ != nullptr) {
    delete update_mask_;
  }
  update_mask_ = nullptr;
}
void Write::clear_current_document() {
  if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
    delete current_document_;
  }
  current_document_ = nullptr;
}
Write::Write()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.Write)
}
Write::Write(const Write& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      update_transforms_(from.update_transforms_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._internal_has_update_mask()) {
    update_mask_ = new ::google::firestore::v1::DocumentMask(*from.update_mask_);
  } else {
    update_mask_ = nullptr;
  }
  if (from._internal_has_current_document()) {
    current_document_ = new ::google::firestore::v1::Precondition(*from.current_document_);
  } else {
    current_document_ = nullptr;
  }
  clear_has_operation();
  switch (from.operation_case()) {
    case kUpdate: {
      _internal_mutable_update()->::google::firestore::v1::Document::MergeFrom(from._internal_update());
      break;
    }
    case kDelete: {
      _internal_set_delete_(from._internal_delete_());
      break;
    }
    case kVerify: {
      _internal_set_verify(from._internal_verify());
      break;
    }
    case kTransform: {
      _internal_mutable_transform()->::google::firestore::v1::DocumentTransform::MergeFrom(from._internal_transform());
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.Write)
}

void Write::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  ::memset(&update_mask_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&current_document_) -
      reinterpret_cast<char*>(&update_mask_)) + sizeof(current_document_));
  clear_has_operation();
}

Write::~Write() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.Write)
  SharedDtor();
}

void Write::SharedDtor() {
  if (this != internal_default_instance()) delete update_mask_;
  if (this != internal_default_instance()) delete current_document_;
  if (has_operation()) {
    clear_operation();
  }
}

void Write::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const Write& Write::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Write_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void Write::clear_operation() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.Write)
  switch (operation_case()) {
    case kUpdate: {
      delete operation_.update_;
      break;
    }
    case kDelete: {
      operation_.delete__.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kVerify: {
      operation_.verify_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
      break;
    }
    case kTransform: {
      delete operation_.transform_;
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = OPERATION_NOT_SET;
}


void Write::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.Write)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  update_transforms_.Clear();
  if (GetArenaNoVirtual() == nullptr && update_mask_ != nullptr) {
    delete update_mask_;
  }
  update_mask_ = nullptr;
  if (GetArenaNoVirtual() == nullptr && current_document_ != nullptr) {
    delete current_document_;
  }
  current_document_ = nullptr;
  clear_operation();
  _internal_metadata_.Clear();
}

const char* Write::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.Document update = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_update(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string delete = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          auto str = _internal_mutable_delete_();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.Write.delete"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentMask update_mask = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_update_mask(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Precondition current_document = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_current_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // string verify = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          auto str = _internal_mutable_verify();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.Write.verify"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentTransform transform = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_transform(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_update_transforms(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* Write::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.Write)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.Document update = 1;
  if (_internal_has_update()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::update(this), target, stream);
  }

  // string delete = 2;
  if (_internal_has_delete_()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_delete_().data(), static_cast<int>(this->_internal_delete_().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.Write.delete");
    target = stream->WriteStringMaybeAliased(
        2, this->_internal_delete_(), target);
  }

  // .google.firestore.v1.DocumentMask update_mask = 3;
  if (this->has_update_mask()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::update_mask(this), target, stream);
  }

  // .google.firestore.v1.Precondition current_document = 4;
  if (this->has_current_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::current_document(this), target, stream);
  }

  // string verify = 5;
  if (_internal_has_verify()) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_verify().data(), static_cast<int>(this->_internal_verify().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.Write.verify");
    target = stream->WriteStringMaybeAliased(
        5, this->_internal_verify(), target);
  }

  // .google.firestore.v1.DocumentTransform transform = 6;
  if (_internal_has_transform()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::transform(this), target, stream);
  }

  // repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_update_transforms_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(7, this->_internal_update_transforms(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.Write)
  return target;
}

size_t Write::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.Write)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7;
  total_size += 1UL * this->_internal_update_transforms_size();
  for (const auto& msg : this->update_transforms_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // .google.firestore.v1.DocumentMask update_mask = 3;
  if (this->has_update_mask()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *update_mask_);
  }

  // .google.firestore.v1.Precondition current_document = 4;
  if (this->has_current_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *current_document_);
  }

  switch (operation_case()) {
    // .google.firestore.v1.Document update = 1;
    case kUpdate: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *operation_.update_);
      break;
    }
    // string delete = 2;
    case kDelete: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_delete_());
      break;
    }
    // string verify = 5;
    case kVerify: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
          this->_internal_verify());
      break;
    }
    // .google.firestore.v1.DocumentTransform transform = 6;
    case kTransform: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *operation_.transform_);
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void Write::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.Write)
  GOOGLE_DCHECK_NE(&from, this);
  const Write* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Write>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.Write)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.Write)
    MergeFrom(*source);
  }
}

void Write::MergeFrom(const Write& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.Write)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  update_transforms_.MergeFrom(from.update_transforms_);
  if (from.has_update_mask()) {
    _internal_mutable_update_mask()->::google::firestore::v1::DocumentMask::MergeFrom(from._internal_update_mask());
  }
  if (from.has_current_document()) {
    _internal_mutable_current_document()->::google::firestore::v1::Precondition::MergeFrom(from._internal_current_document());
  }
  switch (from.operation_case()) {
    case kUpdate: {
      _internal_mutable_update()->::google::firestore::v1::Document::MergeFrom(from._internal_update());
      break;
    }
    case kDelete: {
      _internal_set_delete_(from._internal_delete_());
      break;
    }
    case kVerify: {
      _internal_set_verify(from._internal_verify());
      break;
    }
    case kTransform: {
      _internal_mutable_transform()->::google::firestore::v1::DocumentTransform::MergeFrom(from._internal_transform());
      break;
    }
    case OPERATION_NOT_SET: {
      break;
    }
  }
}

void Write::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.Write)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void Write::CopyFrom(const Write& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.Write)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool Write::IsInitialized() const {
  return true;
}

void Write::InternalSwap(Write* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  update_transforms_.InternalSwap(&other->update_transforms_);
  swap(update_mask_, other->update_mask_);
  swap(current_document_, other->current_document_);
  swap(operation_, other->operation_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata Write::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void DocumentTransform_FieldTransform::InitAsDefaultInstance() {
  ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.set_to_server_value_ = 0;
  ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.increment_ = const_cast< ::google::firestore::v1::Value*>(
      ::google::firestore::v1::Value::internal_default_instance());
  ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.maximum_ = const_cast< ::google::firestore::v1::Value*>(
      ::google::firestore::v1::Value::internal_default_instance());
  ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.minimum_ = const_cast< ::google::firestore::v1::Value*>(
      ::google::firestore::v1::Value::internal_default_instance());
  ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.append_missing_elements_ = const_cast< ::google::firestore::v1::ArrayValue*>(
      ::google::firestore::v1::ArrayValue::internal_default_instance());
  ::google::firestore::v1::_DocumentTransform_FieldTransform_default_instance_.remove_all_from_array_ = const_cast< ::google::firestore::v1::ArrayValue*>(
      ::google::firestore::v1::ArrayValue::internal_default_instance());
}
class DocumentTransform_FieldTransform::_Internal {
 public:
  static const ::google::firestore::v1::Value& increment(const DocumentTransform_FieldTransform* msg);
  static const ::google::firestore::v1::Value& maximum(const DocumentTransform_FieldTransform* msg);
  static const ::google::firestore::v1::Value& minimum(const DocumentTransform_FieldTransform* msg);
  static const ::google::firestore::v1::ArrayValue& append_missing_elements(const DocumentTransform_FieldTransform* msg);
  static const ::google::firestore::v1::ArrayValue& remove_all_from_array(const DocumentTransform_FieldTransform* msg);
};

const ::google::firestore::v1::Value&
DocumentTransform_FieldTransform::_Internal::increment(const DocumentTransform_FieldTransform* msg) {
  return *msg->transform_type_.increment_;
}
const ::google::firestore::v1::Value&
DocumentTransform_FieldTransform::_Internal::maximum(const DocumentTransform_FieldTransform* msg) {
  return *msg->transform_type_.maximum_;
}
const ::google::firestore::v1::Value&
DocumentTransform_FieldTransform::_Internal::minimum(const DocumentTransform_FieldTransform* msg) {
  return *msg->transform_type_.minimum_;
}
const ::google::firestore::v1::ArrayValue&
DocumentTransform_FieldTransform::_Internal::append_missing_elements(const DocumentTransform_FieldTransform* msg) {
  return *msg->transform_type_.append_missing_elements_;
}
const ::google::firestore::v1::ArrayValue&
DocumentTransform_FieldTransform::_Internal::remove_all_from_array(const DocumentTransform_FieldTransform* msg) {
  return *msg->transform_type_.remove_all_from_array_;
}
void DocumentTransform_FieldTransform::set_allocated_increment(::google::firestore::v1::Value* increment) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (increment) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      increment = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, increment, submessage_arena);
    }
    set_has_increment();
    transform_type_.increment_ = increment;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.increment)
}
void DocumentTransform_FieldTransform::clear_increment() {
  if (_internal_has_increment()) {
    delete transform_type_.increment_;
    clear_has_transform_type();
  }
}
void DocumentTransform_FieldTransform::set_allocated_maximum(::google::firestore::v1::Value* maximum) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (maximum) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      maximum = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, maximum, submessage_arena);
    }
    set_has_maximum();
    transform_type_.maximum_ = maximum;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.maximum)
}
void DocumentTransform_FieldTransform::clear_maximum() {
  if (_internal_has_maximum()) {
    delete transform_type_.maximum_;
    clear_has_transform_type();
  }
}
void DocumentTransform_FieldTransform::set_allocated_minimum(::google::firestore::v1::Value* minimum) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (minimum) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      minimum = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, minimum, submessage_arena);
    }
    set_has_minimum();
    transform_type_.minimum_ = minimum;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.minimum)
}
void DocumentTransform_FieldTransform::clear_minimum() {
  if (_internal_has_minimum()) {
    delete transform_type_.minimum_;
    clear_has_transform_type();
  }
}
void DocumentTransform_FieldTransform::set_allocated_append_missing_elements(::google::firestore::v1::ArrayValue* append_missing_elements) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (append_missing_elements) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      append_missing_elements = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, append_missing_elements, submessage_arena);
    }
    set_has_append_missing_elements();
    transform_type_.append_missing_elements_ = append_missing_elements;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.append_missing_elements)
}
void DocumentTransform_FieldTransform::clear_append_missing_elements() {
  if (_internal_has_append_missing_elements()) {
    delete transform_type_.append_missing_elements_;
    clear_has_transform_type();
  }
}
void DocumentTransform_FieldTransform::set_allocated_remove_all_from_array(::google::firestore::v1::ArrayValue* remove_all_from_array) {
  ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual();
  clear_transform_type();
  if (remove_all_from_array) {
    ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr;
    if (message_arena != submessage_arena) {
      remove_all_from_array = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
          message_arena, remove_all_from_array, submessage_arena);
    }
    set_has_remove_all_from_array();
    transform_type_.remove_all_from_array_ = remove_all_from_array;
  }
  // @@protoc_insertion_point(field_set_allocated:google.firestore.v1.DocumentTransform.FieldTransform.remove_all_from_array)
}
void DocumentTransform_FieldTransform::clear_remove_all_from_array() {
  if (_internal_has_remove_all_from_array()) {
    delete transform_type_.remove_all_from_array_;
    clear_has_transform_type();
  }
}
DocumentTransform_FieldTransform::DocumentTransform_FieldTransform()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentTransform.FieldTransform)
}
DocumentTransform_FieldTransform::DocumentTransform_FieldTransform(const DocumentTransform_FieldTransform& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  field_path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_field_path().empty()) {
    field_path_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  }
  clear_has_transform_type();
  switch (from.transform_type_case()) {
    case kSetToServerValue: {
      _internal_set_set_to_server_value(from._internal_set_to_server_value());
      break;
    }
    case kIncrement: {
      _internal_mutable_increment()->::google::firestore::v1::Value::MergeFrom(from._internal_increment());
      break;
    }
    case kMaximum: {
      _internal_mutable_maximum()->::google::firestore::v1::Value::MergeFrom(from._internal_maximum());
      break;
    }
    case kMinimum: {
      _internal_mutable_minimum()->::google::firestore::v1::Value::MergeFrom(from._internal_minimum());
      break;
    }
    case kAppendMissingElements: {
      _internal_mutable_append_missing_elements()->::google::firestore::v1::ArrayValue::MergeFrom(from._internal_append_missing_elements());
      break;
    }
    case kRemoveAllFromArray: {
      _internal_mutable_remove_all_from_array()->::google::firestore::v1::ArrayValue::MergeFrom(from._internal_remove_all_from_array());
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentTransform.FieldTransform)
}

void DocumentTransform_FieldTransform::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  field_path_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_has_transform_type();
}

DocumentTransform_FieldTransform::~DocumentTransform_FieldTransform() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentTransform.FieldTransform)
  SharedDtor();
}

void DocumentTransform_FieldTransform::SharedDtor() {
  field_path_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (has_transform_type()) {
    clear_transform_type();
  }
}

void DocumentTransform_FieldTransform::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DocumentTransform_FieldTransform& DocumentTransform_FieldTransform::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DocumentTransform_FieldTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void DocumentTransform_FieldTransform::clear_transform_type() {
// @@protoc_insertion_point(one_of_clear_start:google.firestore.v1.DocumentTransform.FieldTransform)
  switch (transform_type_case()) {
    case kSetToServerValue: {
      // No need to clear
      break;
    }
    case kIncrement: {
      delete transform_type_.increment_;
      break;
    }
    case kMaximum: {
      delete transform_type_.maximum_;
      break;
    }
    case kMinimum: {
      delete transform_type_.minimum_;
      break;
    }
    case kAppendMissingElements: {
      delete transform_type_.append_missing_elements_;
      break;
    }
    case kRemoveAllFromArray: {
      delete transform_type_.remove_all_from_array_;
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = TRANSFORM_TYPE_NOT_SET;
}


void DocumentTransform_FieldTransform::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentTransform.FieldTransform)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  field_path_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  clear_transform_type();
  _internal_metadata_.Clear();
}

const char* DocumentTransform_FieldTransform::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string field_path = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_field_path();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.DocumentTransform.FieldTransform.field_path"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
          _internal_set_set_to_server_value(static_cast<::google::firestore::v1::DocumentTransform_FieldTransform_ServerValue>(val));
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Value increment = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_increment(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Value maximum = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_maximum(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.Value minimum = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_minimum(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.ArrayValue append_missing_elements = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_append_missing_elements(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) {
          ptr = ctx->ParseMessage(_internal_mutable_remove_all_from_array(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* DocumentTransform_FieldTransform::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentTransform.FieldTransform)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string field_path = 1;
  if (this->field_path().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_field_path().data(), static_cast<int>(this->_internal_field_path().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.DocumentTransform.FieldTransform.field_path");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_field_path(), target);
  }

  // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
  if (_internal_has_set_to_server_value()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
      2, this->_internal_set_to_server_value(), target);
  }

  // .google.firestore.v1.Value increment = 3;
  if (_internal_has_increment()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::increment(this), target, stream);
  }

  // .google.firestore.v1.Value maximum = 4;
  if (_internal_has_maximum()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::maximum(this), target, stream);
  }

  // .google.firestore.v1.Value minimum = 5;
  if (_internal_has_minimum()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::minimum(this), target, stream);
  }

  // .google.firestore.v1.ArrayValue append_missing_elements = 6;
  if (_internal_has_append_missing_elements()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::append_missing_elements(this), target, stream);
  }

  // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
  if (_internal_has_remove_all_from_array()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        7, _Internal::remove_all_from_array(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentTransform.FieldTransform)
  return target;
}

size_t DocumentTransform_FieldTransform::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentTransform.FieldTransform)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // string field_path = 1;
  if (this->field_path().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_field_path());
  }

  switch (transform_type_case()) {
    // .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2;
    case kSetToServerValue: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_set_to_server_value());
      break;
    }
    // .google.firestore.v1.Value increment = 3;
    case kIncrement: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_type_.increment_);
      break;
    }
    // .google.firestore.v1.Value maximum = 4;
    case kMaximum: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_type_.maximum_);
      break;
    }
    // .google.firestore.v1.Value minimum = 5;
    case kMinimum: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_type_.minimum_);
      break;
    }
    // .google.firestore.v1.ArrayValue append_missing_elements = 6;
    case kAppendMissingElements: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_type_.append_missing_elements_);
      break;
    }
    // .google.firestore.v1.ArrayValue remove_all_from_array = 7;
    case kRemoveAllFromArray: {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
          *transform_type_.remove_all_from_array_);
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DocumentTransform_FieldTransform::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentTransform_FieldTransform* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DocumentTransform_FieldTransform>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentTransform.FieldTransform)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentTransform.FieldTransform)
    MergeFrom(*source);
  }
}

void DocumentTransform_FieldTransform::MergeFrom(const DocumentTransform_FieldTransform& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.field_path().size() > 0) {

    field_path_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.field_path_);
  }
  switch (from.transform_type_case()) {
    case kSetToServerValue: {
      _internal_set_set_to_server_value(from._internal_set_to_server_value());
      break;
    }
    case kIncrement: {
      _internal_mutable_increment()->::google::firestore::v1::Value::MergeFrom(from._internal_increment());
      break;
    }
    case kMaximum: {
      _internal_mutable_maximum()->::google::firestore::v1::Value::MergeFrom(from._internal_maximum());
      break;
    }
    case kMinimum: {
      _internal_mutable_minimum()->::google::firestore::v1::Value::MergeFrom(from._internal_minimum());
      break;
    }
    case kAppendMissingElements: {
      _internal_mutable_append_missing_elements()->::google::firestore::v1::ArrayValue::MergeFrom(from._internal_append_missing_elements());
      break;
    }
    case kRemoveAllFromArray: {
      _internal_mutable_remove_all_from_array()->::google::firestore::v1::ArrayValue::MergeFrom(from._internal_remove_all_from_array());
      break;
    }
    case TRANSFORM_TYPE_NOT_SET: {
      break;
    }
  }
}

void DocumentTransform_FieldTransform::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentTransform_FieldTransform::CopyFrom(const DocumentTransform_FieldTransform& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentTransform.FieldTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentTransform_FieldTransform::IsInitialized() const {
  return true;
}

void DocumentTransform_FieldTransform::InternalSwap(DocumentTransform_FieldTransform* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  field_path_.Swap(&other->field_path_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(transform_type_, other->transform_type_);
  swap(_oneof_case_[0], other->_oneof_case_[0]);
}

::PROTOBUF_NAMESPACE_ID::Metadata DocumentTransform_FieldTransform::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void DocumentTransform::InitAsDefaultInstance() {
}
class DocumentTransform::_Internal {
 public:
};

DocumentTransform::DocumentTransform()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentTransform)
}
DocumentTransform::DocumentTransform(const DocumentTransform& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      field_transforms_(from.field_transforms_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  document_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_document().empty()) {
    document_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentTransform)
}

void DocumentTransform::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  document_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

DocumentTransform::~DocumentTransform() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentTransform)
  SharedDtor();
}

void DocumentTransform::SharedDtor() {
  document_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
}

void DocumentTransform::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DocumentTransform& DocumentTransform::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DocumentTransform_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void DocumentTransform::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentTransform)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  field_transforms_.Clear();
  document_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  _internal_metadata_.Clear();
}

const char* DocumentTransform::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string document = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_document();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.DocumentTransform.document"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_field_transforms(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* DocumentTransform::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentTransform)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_document().data(), static_cast<int>(this->_internal_document().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.DocumentTransform.document");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_document(), target);
  }

  // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_field_transforms_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_field_transforms(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentTransform)
  return target;
}

size_t DocumentTransform::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentTransform)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2;
  total_size += 1UL * this->_internal_field_transforms_size();
  for (const auto& msg : this->field_transforms_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // string document = 1;
  if (this->document().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_document());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DocumentTransform::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentTransform)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentTransform* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DocumentTransform>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentTransform)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentTransform)
    MergeFrom(*source);
  }
}

void DocumentTransform::MergeFrom(const DocumentTransform& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentTransform)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  field_transforms_.MergeFrom(from.field_transforms_);
  if (from.document().size() > 0) {

    document_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
}

void DocumentTransform::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentTransform::CopyFrom(const DocumentTransform& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentTransform)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentTransform::IsInitialized() const {
  return true;
}

void DocumentTransform::InternalSwap(DocumentTransform* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  field_transforms_.InternalSwap(&other->field_transforms_);
  document_.Swap(&other->document_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
}

::PROTOBUF_NAMESPACE_ID::Metadata DocumentTransform::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void WriteResult::InitAsDefaultInstance() {
  ::google::firestore::v1::_WriteResult_default_instance_._instance.get_mutable()->update_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class WriteResult::_Internal {
 public:
  static const PROTOBUF_NAMESPACE_ID::Timestamp& update_time(const WriteResult* msg);
};

const PROTOBUF_NAMESPACE_ID::Timestamp&
WriteResult::_Internal::update_time(const WriteResult* msg) {
  return *msg->update_time_;
}
void WriteResult::clear_update_time() {
  if (GetArenaNoVirtual() == nullptr && update_time_ != nullptr) {
    delete update_time_;
  }
  update_time_ = nullptr;
}
void WriteResult::clear_transform_results() {
  transform_results_.Clear();
}
WriteResult::WriteResult()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.WriteResult)
}
WriteResult::WriteResult(const WriteResult& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      transform_results_(from.transform_results_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._internal_has_update_time()) {
    update_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.update_time_);
  } else {
    update_time_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.WriteResult)
}

void WriteResult::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  update_time_ = nullptr;
}

WriteResult::~WriteResult() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.WriteResult)
  SharedDtor();
}

void WriteResult::SharedDtor() {
  if (this != internal_default_instance()) delete update_time_;
}

void WriteResult::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const WriteResult& WriteResult::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_WriteResult_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void WriteResult::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.WriteResult)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  transform_results_.Clear();
  if (GetArenaNoVirtual() == nullptr && update_time_ != nullptr) {
    delete update_time_;
  }
  update_time_ = nullptr;
  _internal_metadata_.Clear();
}

const char* WriteResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.protobuf.Timestamp update_time = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_update_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated .google.firestore.v1.Value transform_results = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_transform_results(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* WriteResult::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.WriteResult)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.protobuf.Timestamp update_time = 1;
  if (this->has_update_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::update_time(this), target, stream);
  }

  // repeated .google.firestore.v1.Value transform_results = 2;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_transform_results_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(2, this->_internal_transform_results(i), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.WriteResult)
  return target;
}

size_t WriteResult::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.WriteResult)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .google.firestore.v1.Value transform_results = 2;
  total_size += 1UL * this->_internal_transform_results_size();
  for (const auto& msg : this->transform_results_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // .google.protobuf.Timestamp update_time = 1;
  if (this->has_update_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *update_time_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void WriteResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.WriteResult)
  GOOGLE_DCHECK_NE(&from, this);
  const WriteResult* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<WriteResult>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.WriteResult)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.WriteResult)
    MergeFrom(*source);
  }
}

void WriteResult::MergeFrom(const WriteResult& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.WriteResult)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  transform_results_.MergeFrom(from.transform_results_);
  if (from.has_update_time()) {
    _internal_mutable_update_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_update_time());
  }
}

void WriteResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.WriteResult)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void WriteResult::CopyFrom(const WriteResult& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.WriteResult)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool WriteResult::IsInitialized() const {
  return true;
}

void WriteResult::InternalSwap(WriteResult* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  transform_results_.InternalSwap(&other->transform_results_);
  swap(update_time_, other->update_time_);
}

::PROTOBUF_NAMESPACE_ID::Metadata WriteResult::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void DocumentChange::InitAsDefaultInstance() {
  ::google::firestore::v1::_DocumentChange_default_instance_._instance.get_mutable()->document_ = const_cast< ::google::firestore::v1::Document*>(
      ::google::firestore::v1::Document::internal_default_instance());
}
class DocumentChange::_Internal {
 public:
  static const ::google::firestore::v1::Document& document(const DocumentChange* msg);
};

const ::google::firestore::v1::Document&
DocumentChange::_Internal::document(const DocumentChange* msg) {
  return *msg->document_;
}
void DocumentChange::clear_document() {
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
}
DocumentChange::DocumentChange()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentChange)
}
DocumentChange::DocumentChange(const DocumentChange& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      target_ids_(from.target_ids_),
      removed_target_ids_(from.removed_target_ids_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  if (from._internal_has_document()) {
    document_ = new ::google::firestore::v1::Document(*from.document_);
  } else {
    document_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentChange)
}

void DocumentChange::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  document_ = nullptr;
}

DocumentChange::~DocumentChange() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentChange)
  SharedDtor();
}

void DocumentChange::SharedDtor() {
  if (this != internal_default_instance()) delete document_;
}

void DocumentChange::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DocumentChange& DocumentChange::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DocumentChange_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void DocumentChange::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentChange)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  target_ids_.Clear();
  removed_target_ids_.Clear();
  if (GetArenaNoVirtual() == nullptr && document_ != nullptr) {
    delete document_;
  }
  document_ = nullptr;
  _internal_metadata_.Clear();
}

const char* DocumentChange::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .google.firestore.v1.Document document = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated int32 target_ids = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_target_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40) {
          _internal_add_target_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated int32 removed_target_ids = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_removed_target_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48) {
          _internal_add_removed_target_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* DocumentChange::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentChange)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .google.firestore.v1.Document document = 1;
  if (this->has_document()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::document(this), target, stream);
  }

  // repeated int32 target_ids = 5;
  {
    int byte_size = _target_ids_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          5, _internal_target_ids(), byte_size, target);
    }
  }

  // repeated int32 removed_target_ids = 6;
  {
    int byte_size = _removed_target_ids_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          6, _internal_removed_target_ids(), byte_size, target);
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentChange)
  return target;
}

size_t DocumentChange::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentChange)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 target_ids = 5;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _target_ids_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // repeated int32 removed_target_ids = 6;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->removed_target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _removed_target_ids_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // .google.firestore.v1.Document document = 1;
  if (this->has_document()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *document_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DocumentChange::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentChange)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentChange* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DocumentChange>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentChange)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentChange)
    MergeFrom(*source);
  }
}

void DocumentChange::MergeFrom(const DocumentChange& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentChange)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  target_ids_.MergeFrom(from.target_ids_);
  removed_target_ids_.MergeFrom(from.removed_target_ids_);
  if (from.has_document()) {
    _internal_mutable_document()->::google::firestore::v1::Document::MergeFrom(from._internal_document());
  }
}

void DocumentChange::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentChange::CopyFrom(const DocumentChange& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentChange)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentChange::IsInitialized() const {
  return true;
}

void DocumentChange::InternalSwap(DocumentChange* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  target_ids_.InternalSwap(&other->target_ids_);
  removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  swap(document_, other->document_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DocumentChange::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void DocumentDelete::InitAsDefaultInstance() {
  ::google::firestore::v1::_DocumentDelete_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class DocumentDelete::_Internal {
 public:
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const DocumentDelete* msg);
};

const PROTOBUF_NAMESPACE_ID::Timestamp&
DocumentDelete::_Internal::read_time(const DocumentDelete* msg) {
  return *msg->read_time_;
}
void DocumentDelete::clear_read_time() {
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
}
DocumentDelete::DocumentDelete()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentDelete)
}
DocumentDelete::DocumentDelete(const DocumentDelete& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      removed_target_ids_(from.removed_target_ids_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  document_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_document().empty()) {
    document_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from._internal_has_read_time()) {
    read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  } else {
    read_time_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentDelete)
}

void DocumentDelete::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  document_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  read_time_ = nullptr;
}

DocumentDelete::~DocumentDelete() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentDelete)
  SharedDtor();
}

void DocumentDelete::SharedDtor() {
  document_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete read_time_;
}

void DocumentDelete::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DocumentDelete& DocumentDelete::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DocumentDelete_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void DocumentDelete::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentDelete)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  removed_target_ids_.Clear();
  document_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
  _internal_metadata_.Clear();
}

const char* DocumentDelete::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string document = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_document();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.DocumentDelete.document"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated int32 removed_target_ids = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_removed_target_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48) {
          _internal_add_removed_target_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* DocumentDelete::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentDelete)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_document().data(), static_cast<int>(this->_internal_document().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.DocumentDelete.document");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_document(), target);
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::read_time(this), target, stream);
  }

  // repeated int32 removed_target_ids = 6;
  {
    int byte_size = _removed_target_ids_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          6, _internal_removed_target_ids(), byte_size, target);
    }
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentDelete)
  return target;
}

size_t DocumentDelete::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentDelete)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 removed_target_ids = 6;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->removed_target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _removed_target_ids_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // string document = 1;
  if (this->document().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_document());
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *read_time_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DocumentDelete::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentDelete)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentDelete* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DocumentDelete>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentDelete)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentDelete)
    MergeFrom(*source);
  }
}

void DocumentDelete::MergeFrom(const DocumentDelete& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentDelete)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  removed_target_ids_.MergeFrom(from.removed_target_ids_);
  if (from.document().size() > 0) {

    document_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from.has_read_time()) {
    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  }
}

void DocumentDelete::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentDelete)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentDelete::CopyFrom(const DocumentDelete& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentDelete)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentDelete::IsInitialized() const {
  return true;
}

void DocumentDelete::InternalSwap(DocumentDelete* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  document_.Swap(&other->document_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(read_time_, other->read_time_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DocumentDelete::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void DocumentRemove::InitAsDefaultInstance() {
  ::google::firestore::v1::_DocumentRemove_default_instance_._instance.get_mutable()->read_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>(
      PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance());
}
class DocumentRemove::_Internal {
 public:
  static const PROTOBUF_NAMESPACE_ID::Timestamp& read_time(const DocumentRemove* msg);
};

const PROTOBUF_NAMESPACE_ID::Timestamp&
DocumentRemove::_Internal::read_time(const DocumentRemove* msg) {
  return *msg->read_time_;
}
void DocumentRemove::clear_read_time() {
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
}
DocumentRemove::DocumentRemove()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.DocumentRemove)
}
DocumentRemove::DocumentRemove(const DocumentRemove& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr),
      removed_target_ids_(from.removed_target_ids_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  document_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (!from._internal_document().empty()) {
    document_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from._internal_has_read_time()) {
    read_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.read_time_);
  } else {
    read_time_ = nullptr;
  }
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.DocumentRemove)
}

void DocumentRemove::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  document_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  read_time_ = nullptr;
}

DocumentRemove::~DocumentRemove() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.DocumentRemove)
  SharedDtor();
}

void DocumentRemove::SharedDtor() {
  document_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete read_time_;
}

void DocumentRemove::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const DocumentRemove& DocumentRemove::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DocumentRemove_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void DocumentRemove::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.DocumentRemove)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  removed_target_ids_.Clear();
  document_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  if (GetArenaNoVirtual() == nullptr && read_time_ != nullptr) {
    delete read_time_;
  }
  read_time_ = nullptr;
  _internal_metadata_.Clear();
}

const char* DocumentRemove::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // string document = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          auto str = _internal_mutable_document();
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
          CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "google.firestore.v1.DocumentRemove.document"));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated int32 removed_target_ids = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_removed_target_ids(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) {
          _internal_add_removed_target_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr));
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .google.protobuf.Timestamp read_time = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
          ptr = ctx->ParseMessage(_internal_mutable_read_time(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* DocumentRemove::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.DocumentRemove)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // string document = 1;
  if (this->document().size() > 0) {
    ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
      this->_internal_document().data(), static_cast<int>(this->_internal_document().length()),
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
      "google.firestore.v1.DocumentRemove.document");
    target = stream->WriteStringMaybeAliased(
        1, this->_internal_document(), target);
  }

  // repeated int32 removed_target_ids = 2;
  {
    int byte_size = _removed_target_ids_cached_byte_size_.load(std::memory_order_relaxed);
    if (byte_size > 0) {
      target = stream->WriteInt32Packed(
          2, _internal_removed_target_ids(), byte_size, target);
    }
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        4, _Internal::read_time(this), target, stream);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.DocumentRemove)
  return target;
}

size_t DocumentRemove::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.DocumentRemove)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated int32 removed_target_ids = 2;
  {
    size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      Int32Size(this->removed_target_ids_);
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _removed_target_ids_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // string document = 1;
  if (this->document().size() > 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
        this->_internal_document());
  }

  // .google.protobuf.Timestamp read_time = 4;
  if (this->has_read_time()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *read_time_);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void DocumentRemove::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.DocumentRemove)
  GOOGLE_DCHECK_NE(&from, this);
  const DocumentRemove* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<DocumentRemove>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.DocumentRemove)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.DocumentRemove)
    MergeFrom(*source);
  }
}

void DocumentRemove::MergeFrom(const DocumentRemove& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.DocumentRemove)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  removed_target_ids_.MergeFrom(from.removed_target_ids_);
  if (from.document().size() > 0) {

    document_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.document_);
  }
  if (from.has_read_time()) {
    _internal_mutable_read_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_read_time());
  }
}

void DocumentRemove::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.DocumentRemove)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void DocumentRemove::CopyFrom(const DocumentRemove& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.DocumentRemove)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DocumentRemove::IsInitialized() const {
  return true;
}

void DocumentRemove::InternalSwap(DocumentRemove* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  removed_target_ids_.InternalSwap(&other->removed_target_ids_);
  document_.Swap(&other->document_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(read_time_, other->read_time_);
}

::PROTOBUF_NAMESPACE_ID::Metadata DocumentRemove::GetMetadata() const {
  return GetMetadataStatic();
}


// ===================================================================

void ExistenceFilter::InitAsDefaultInstance() {
}
class ExistenceFilter::_Internal {
 public:
};

ExistenceFilter::ExistenceFilter()
  : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  SharedCtor();
  // @@protoc_insertion_point(constructor:google.firestore.v1.ExistenceFilter)
}
ExistenceFilter::ExistenceFilter(const ExistenceFilter& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      _internal_metadata_(nullptr) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&target_id_, &from.target_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&count_) -
    reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  // @@protoc_insertion_point(copy_constructor:google.firestore.v1.ExistenceFilter)
}

void ExistenceFilter::SharedCtor() {
  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&count_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
}

ExistenceFilter::~ExistenceFilter() {
  // @@protoc_insertion_point(destructor:google.firestore.v1.ExistenceFilter)
  SharedDtor();
}

void ExistenceFilter::SharedDtor() {
}

void ExistenceFilter::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ExistenceFilter& ExistenceFilter::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ExistenceFilter_google_2ffirestore_2fv1_2fwrite_2eproto.base);
  return *internal_default_instance();
}


void ExistenceFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:google.firestore.v1.ExistenceFilter)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  ::memset(&target_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&count_) -
      reinterpret_cast<char*>(&target_id_)) + sizeof(count_));
  _internal_metadata_.Clear();
}

const char* ExistenceFilter::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // int32 target_id = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          target_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 count = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ExistenceFilter::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:google.firestore.v1.ExistenceFilter)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 target_id = 1;
  if (this->target_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_target_id(), target);
  }

  // int32 count = 2;
  if (this->count() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_count(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target, stream);
  }
  // @@protoc_insertion_point(serialize_to_array_end:google.firestore.v1.ExistenceFilter)
  return target;
}

size_t ExistenceFilter::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.firestore.v1.ExistenceFilter)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // int32 target_id = 1;
  if (this->target_id() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_target_id());
  }

  // int32 count = 2;
  if (this->count() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_count());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ExistenceFilter::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:google.firestore.v1.ExistenceFilter)
  GOOGLE_DCHECK_NE(&from, this);
  const ExistenceFilter* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ExistenceFilter>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.firestore.v1.ExistenceFilter)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:google.firestore.v1.ExistenceFilter)
    MergeFrom(*source);
  }
}

void ExistenceFilter::MergeFrom(const ExistenceFilter& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:google.firestore.v1.ExistenceFilter)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.target_id() != 0) {
    _internal_set_target_id(from._internal_target_id());
  }
  if (from.count() != 0) {
    _internal_set_count(from._internal_count());
  }
}

void ExistenceFilter::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:google.firestore.v1.ExistenceFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

void ExistenceFilter::CopyFrom(const ExistenceFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.firestore.v1.ExistenceFilter)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ExistenceFilter::IsInitialized() const {
  return true;
}

void ExistenceFilter::InternalSwap(ExistenceFilter* other) {
  using std::swap;
  _internal_metadata_.Swap(&other->_internal_metadata_);
  swap(target_id_, other->target_id_);
  swap(count_, other->count_);
}

::PROTOBUF_NAMESPACE_ID::Metadata ExistenceFilter::GetMetadata() const {
  return GetMetadataStatic();
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace v1
}  // namespace firestore
}  // namespace google
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::google::firestore::v1::Write* Arena::CreateMaybeMessage< ::google::firestore::v1::Write >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::Write >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::DocumentTransform_FieldTransform* Arena::CreateMaybeMessage< ::google::firestore::v1::DocumentTransform_FieldTransform >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::DocumentTransform_FieldTransform >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::DocumentTransform* Arena::CreateMaybeMessage< ::google::firestore::v1::DocumentTransform >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::DocumentTransform >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::WriteResult* Arena::CreateMaybeMessage< ::google::firestore::v1::WriteResult >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::WriteResult >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::DocumentChange* Arena::CreateMaybeMessage< ::google::firestore::v1::DocumentChange >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::DocumentChange >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::DocumentDelete* Arena::CreateMaybeMessage< ::google::firestore::v1::DocumentDelete >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::DocumentDelete >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::DocumentRemove* Arena::CreateMaybeMessage< ::google::firestore::v1::DocumentRemove >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::DocumentRemove >(arena);
}
template<> PROTOBUF_NOINLINE ::google::firestore::v1::ExistenceFilter* Arena::CreateMaybeMessage< ::google::firestore::v1::ExistenceFilter >(Arena* arena) {
  return Arena::CreateInternal< ::google::firestore::v1::ExistenceFilter >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
